package org.jeecg.modules.fk.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.fk.entity.DjCheckBO;
import org.jeecg.modules.fk.entity.DjCheckVO;
import org.jeecg.modules.fk.entity.DjRealName;
import org.jeecg.modules.fk.entity.DjUserInfo;
import org.jeecg.modules.fk.entity.req.DjUserAssignRequest;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

/**
 * @Description: dj_user_org_ext
 * @Author: ZJJ
 * @Date:   2021-05-14
 * @Version: V1.0
 */
public interface DjUserInfoMapper extends BaseMapper<DjUserInfo> {

    @Select("select nsrmc from dj_org where nsrsbh = #{nsrsbh}")
    String getNsrmcByNsrsbh(String nsrsbh);

    @Select("select * from dj_user_org_ext where sale_net_code like concat(#{s},'%')")
    List<DjUserInfo> getNsrxxBySaleNetCode(String s);

    @Select("select dj_user_id from sys_user_dj_user where sys_user_id = #{id}")
    List<String> getDjUserIds(String id);

    @Select("select nsrsbh from dj_org where nsrmc like concat('%',#{nsrmc},'%')")
    List<String> getNsrsbhByNsrmc(String nsrmc);

    @Select("select * from dj_user_org_ext where nsrsbh = #{nsrsbh}")
    DjUserInfo getNsrxxByNsrsbh(String nsrsbh);

    List<DjUserInfo> listForPage(DjUserInfo djUserInfo);

    @Insert("insert into dj_real_name()")
    void saveToDjRealName(DjRealName djRealName);

    DjCheckVO getUserInfoByNsrsbh(String nsrsbh);

    void setDjUser2SysUser(DjUserAssignRequest djUserAssignRequest);
}
